{weiget frontend_weiget/header}

	 <section>
         <!-- Page content-->
         <div class="content-wrapper">
            <h3>更新模型
               <small>主要是数据层分类，可以添加字段</small>
            </h3>
            <!-- START row-->
            <div class="row">
               <div class="col-sm-6">
                  <!-- START panel-->
                  <div class="panel panel-default">
                     <div class="panel-body">
                  <form method="post" action="{SELF_URL}former/updateprototype/?id={$prototypeInfo[prototypeid]}" class="form-horizontal">
                     <fieldset>
                        <legend>基础信息</legend>
                        <div class="form-group">
                           <label class="col-sm-4 control-label">唯一标记</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="必须输入英文" name="prototype[name]" class="form-control form-control-rounded" data-parsley-minlength="4" value="{$prototypeInfo[name]}">
                           </div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-4 control-label">模型</label>
                           <div class="col-sm-6">
                              <select name="prototype[formerid]" class="chosen-select form-control">
							  <!--{loop $formers $former}-->
							  <!--{if $former[formerid] == $prototypeInfo[formerid]}-->
                                 <option value="{$former[formerid]}" selected="selected"><!--{$former[title]}--></option>
							  <!--{else}-->
                                 <option value="{$former[formerid]}"><!--{$former[title]}--></option>
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-4 control-label">名称</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="不能为空，最好是中文" name="prototype[title]" class="form-control" data-parsley-minlength="4" value="{$prototypeInfo[title]}">
                           </div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-4 control-label">描述</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="不超过100字" name="prototype[desc]" class="form-control" value="{$prototypeInfo[desc]}">
                           </div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-4 control-label">进入仪表盘</label>
                           <div class="col-sm-6">
                              <select name="prototype[dashboard]" class="chosen-select form-control">
							  <!--{if $prototypeInfo[dashboard] == 1}-->
                                 <option value="1" selected="selected">是</option>
                                 <option value="0">否</option>
                              <!--{else}-->
                                 <option value="1">是</option>
                                 <option value="0" selected="selected">否</option>
                              <!--{/if}-->
                              </select>
                           </div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-4 control-label">开启工作流</label>
                           <div class="col-sm-6">
                              <select name="prototype[workflowable]" class="chosen-select form-control">
							  <!--{if $prototypeInfo[workflowable] == 1}-->
                                 <option value="1" selected="selected">是</option>
                                 <option value="0">否</option>
                              <!--{else}-->
                                 <option value="1">是</option>
                                 <option value="0" selected="selected">否</option>
                              <!--{/if}-->
                              </select>
                           </div>
                        </div>
                     </fieldset>

                     <fieldset>
                        <div class="form-group">
                           <div class="col-sm-4 col-sm-offset-2">
						   <input type="hidden" name="dosubmit" value="1">
                              <button type="submit" class="btn btn-primary">保存</button>
                           </div>
                        </div>
                     </fieldset>
                  </form>
 
                     </div>
                  </div>
                  <!-- END panel-->
               </div>
               <div class="col-sm-6">
                  <!-- START panel-->
                  <div class="panel panel-default">
                     <div class="panel-body">
                        <legend>包含字段</legend>
                            <table id="datatable1" class="table table-striped table-hover">
                              <thead>
                                 <tr>
                                    <th>编码</th>
                                    <th>名称</th>
                                    <th class="sort-numeric">唯一标识</th>
                                    <th>列表</th>
                                    <th class="sort-alpha">操作</th>
                                 </tr>
                              </thead>
                              <tbody>
								<!--{loop $fieldInfos $fieldInfo}-->
                                 <tr class="gradeX">
                                    <td><!--{$fieldInfo[fieldid]}--></td>
                                    <td><!--{$fieldInfo[title]}--></td>
                                    <td><!--{$fieldInfo[name]}--></td>
                                    <td>
									<!--{if $fieldInfo[showinlist] > 0}-->
									可见
									<!--{else}-->
									不可见
									<!--{/if}-->
									</td>
									<td><a href="{SELF_URL}former/updatefield/?id={$fieldInfo[fieldid]}">修改</a> <!--a href="{SELF_URL}former/delfield/?id={$fieldInfo[fieldid]}">删除</a--></td>
                                 </tr>
								<!--{/loop}-->
                              </tbody>
                           </table>
                     </div>
                     <div class="panel-heading ">
						<a href="{SELF_URL}former/addfield/?id={$prototypeInfo[prototypeid]}">添加字段</a>
					 </div>
                  </div>
                  <!-- END panel-->
               </div>
            </div>
            <!-- END row-->
         </div>
      </section>

{weiget frontend_weiget/footer}